import 'package:flutter/material.dart';
import 'package:lifechart/home/home.dart';

class LoginPassword extends StatefulWidget {
  const LoginPassword({Key? key}) : super(key: key);

  @override
  State<LoginPassword> createState() => _LoginPasswordState();
}

class _LoginPasswordState extends State<LoginPassword> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('密码设置',style: TextStyle(fontSize: 12),),
          leading: IconButton(onPressed: () {
            //页面返回
            Navigator.pop(context);
          },
            icon: Icon(Icons.keyboard_arrow_left_rounded),

          ),
      ),
      body: Container(
        child: Column(
          children:  [
            //密码框
            Container(
              height: 70,
              margin: EdgeInsets.only(
                right: 30,
                left: 30,
                top: 20
              ),
              child: TextField(
                keyboardType: TextInputType.text,
                // controller: _phone,
                maxLength: 11,
                decoration: InputDecoration(
                 hintText: '输入密码',
                  fillColor: Colors.black12,
                  filled: true,
                  enabledBorder: OutlineInputBorder(
                    borderSide: BorderSide(color: Colors.white),
                    borderRadius: BorderRadius.all(Radius.circular(10)),

                  ),
                  focusedBorder: OutlineInputBorder(
                    borderSide: BorderSide(color: Colors.white),
                    borderRadius: BorderRadius.all(Radius.circular(10)),
                  )




                ),
                obscureText: true,

              ),
            ),
            //密码框
            Container(
              margin: EdgeInsets.only(
                  right: 40,
                  left: 40,
                  top: 10
              ),
              child: TextField(
                keyboardType: TextInputType.text,
                decoration: InputDecoration(
                    hintText: '输入密码',
                    fillColor: Colors.black12,
                    filled: true,
                    enabledBorder: OutlineInputBorder(
                      borderSide: BorderSide(color: Colors.white),
                      borderRadius: BorderRadius.all(Radius.circular(8)),

                    ),
                    focusedBorder: OutlineInputBorder(
                      borderSide: BorderSide(color: Colors.white),
                      borderRadius: BorderRadius.all(Radius.circular(8)),
                    )




                ),
                obscureText: true,

              ),
            ),
            Container(
              margin: EdgeInsets.only(
                top: 10
              ),
              width: 400,
              height: 55,

              child: Center(
              child: Container(
                width: 280,
                height: 50,

                child: RaisedButton(
                  color: Colors.lightBlue,
                  onPressed: (){
                  //页面提交
                  Navigator.push(context, MaterialPageRoute(builder: (context) => Home()));

                }, child: Text('注册提交'),),
              ),
            ),)



          ],
        ),
      ),
    );
  }
}

